export default class State {
    public static readonly InvalidState: string = 'Invalid';

    protected _owner: Object;
    public get owner(): Object { return this._owner; }


    public constructor(owner: Object) {
        this._owner = owner;
    }


    /**
     * 进入状态
     * @param obj 
     */
    public onEnter(obj: Object = null): void {

    }

    /**
     * 再次进入状态
     * @param obj 
     */
    public onReEnter(obj: Object = null): void {

    }

    /**
     * 状态更新
     */
    public onUpdate(): void {

    }

    /**
     * 离开状态
     * @param preKey 
     */
    public onLeave(preKey: string): void {

    }

    /**
     * 状态ID
     */
    public getStateKey(): string {
        return State.InvalidState;
    }
}
